import asyncio
import time


class Response:
    status_code = 200


async def sim_request():
    response = Response()
    await asyncio.sleep(0.2)
    print(f"current resonse: {response.status_code}")
    return response.status_code

# print(sim_request())
task_array = []
for i in range(100):
    task_array.append(sim_request())
# 我们要获取异步的事件队列
loop = asyncio.get_event_loop()
# loop.run_until_complete(asyncio.wait(task_array))
result_array = loop.run_until_complete(asyncio.gather(*task_array))
loop.close()
print(result_array)